# File: Profissional.py
"""\
Profissional Python/Zope/Plone com participacao na comunidade.

"""
# Copyright (c) 2005 by TcheZope.org
# Generator: ArchGenXML Version 1.4 devel 4 http://sf.net/projects/archetypes/
#
# GNU General Public Licence (GPL)
# 
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *

from Perfil import Perfil


from Products.PloneZopista.config import *
##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    StringField('sexo',
        widget=SelectionWidget
        (
            description="Informe o seu sexo.",
            label='Sexo',
            label_msgid='PloneZopista_label_sexo',
            description_msgid='PloneZopista_help_sexo',
            i18n_domain='PloneZopista',
        ),
        enforceVocabulary=1,
        vocabulary=VOCAB_SEXOS,
        required=1,
    ),
    
    DateTimeField('nascimento',
        widget=CalendarWidget(
            description="Informe a data do seu nascimento.",
            format='%d/%m/%Y',
            date_only=1,
            label='Nascimento',
            label_msgid='PloneZopista_label_nascimento',
            description_msgid='PloneZopista_help_nascimento',
            i18n_domain='PloneZopista',
        ),
    ),
    
    StringField('hobbie',
        widget=StringWidget(
            description="Informe seu(s) hobbie(s).",
            label='Hobbie',
            label_msgid='PloneZopista_label_hobbie',
            description_msgid='PloneZopista_help_hobbie',
            i18n_domain='PloneZopista',
        ),
    ),
    
    ImageField('foto',
        allowable_content_types=('image/*',),
        widget=ImageWidget(
            description="Selecione uma fotografia sua. Tenha cuidado com tamanho e resolucao dessa imagem.",
            label='Foto',
            label_msgid='PloneZopista_label_foto',
            description_msgid='PloneZopista_help_foto',
            i18n_domain='PloneZopista',
        ),
        default_output_tipe="image/jpeg",
        storage=AttributeStorage(),
        original_size=(100,75),
    ),
    
    TextField('idiomas',
        widget=TextAreaWidget(
            description="Informe os idiomas que conhece e o grau de conhecimento desses idiomas.",
            rows=3,
            label='Idiomas',
            label_msgid='PloneZopista_label_idiomas',
            description_msgid='PloneZopista_help_idiomas',
            i18n_domain='PloneZopista',
        ),
    ),
    
    TextField('formacao',
        widget=TextAreaWidget(
            description="Informe sua formacao.",
            rows=5,
            label='Formacao',
            label_msgid='PloneZopista_label_formacao',
            description_msgid='PloneZopista_help_formacao',
            i18n_domain='PloneZopista',
        ),
    ),
    
    TextField('experiencias',
        widget=TextAreaWidget(
            description="Informe suas experiencias com as tecnologias Python/Zope/Plone e afins.",
            label='Experiencias',
            label_msgid='PloneZopista_label_experiencias',
            description_msgid='PloneZopista_help_experiencias',
            i18n_domain='PloneZopista',
        ),
        required=1,
        searchable=1,
    ),
    
),
)


##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Profissional(Perfil,BaseContent):
    """
    Profissional Python/Zope/Plone com participacao na comunidade.
    """
    security = ClassSecurityInfo()
    __implements__ = (getattr(Perfil,'__implements__',()),) + (getattr(BaseContent,'__implements__',()),)


    # This name appears in the 'add' box
    archetype_name             = 'Profissional'

    meta_type    = 'Profissional' 
    portal_type  = 'Profissional' 
    allowed_content_types      = [] + list(getattr(Perfil, 'allowed_content_types', []))
    filter_content_types       = 0
    global_allow               = 0
    allow_discussion           = 0
    content_icon               = 'profissional_icon.gif'
    immediate_view             = 'base_view'
    default_view               = 'base_view'
    typeDescription            = "Profissional"
    typeDescMsgId              = 'description_edit_profissional'

    schema = BaseSchema + \
             getattr(Perfil,'schema',Schema(())) + \
             schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

registerType(Profissional,PROJECTNAME)
# end of class Profissional

##code-section module-footer #fill in your manual code here
##/code-section module-footer



